package com.lvmama.common.enums;

import lombok.Getter;
import lombok.Setter;

/**
 * @PackageName:
 * @ClassName:
 * @Author: wangpeng
 * @Description: (智能推荐->展位报告下需要展现的指标的枚举类)
 * @Date: 2018/6/27 下午3:37
 */
public enum RecommendEnum {

    TOTALRECOMMEND("totalRecommend","推荐次数"),
    TOTALCLICK("totalClick","点击数"),
//    TOTALORDER("totalOrder","订单数"),
//    CONVERSIONRATE("conversionRate","转化率"),
//    TOTALTURNOVER("totalTurnover","营业额"),
    CLICKRATE("clickRate","点击率");

    RecommendEnum(String code, String name){
        this.code = code;
        this.name = name;
    }

    public static RecommendEnum getByCode(String code){
        RecommendEnum ret = null;
        for(RecommendEnum e : RecommendEnum.values()){
            if(e.code.equals(code)){
                ret = e;
                break;
            }
        }
        return ret;
    }

    @Getter @Setter
    private String code;

    @Getter @Setter
    private String name;
}
